<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="format-detection" content="email=no" />
    <title>王者争霸</title>
    <script src="/wk/Public/js/public.js"></script>
    <link rel="stylesheet" href="/wk/Public/css/common.css">
    <link rel="stylesheet" href="/wk/Public/css/pageIndex.css">
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body ontouchstart>
    <div id="con">
        <div class="partTop">
            <span id="shareBtn"></span>
            <div class="selfInfo">
                <img class="selfImg" src="<?php echo ($userinfo['headimgurl']); ?>" alt="">
                <p class="selfName"><?php echo ($userinfo['nickname']); ?></p>
            </div>
            <div class="infoDetail">
                <div class="dBox1">
                    <p class="infoBox Boxes1">
                        <span class="info-txt"><i class="icon_img"><img src="/wk/Public/images/icon_money.png" alt=""></i>认购总金额: <?php echo ($nowrank['money']); ?>元</span>
                    </p>
                    <div class="Boxes2">
                        <p class="infoBox infoBox1">
                            <span class="info-txt"><i class="icon_img"><img src="/wk/Public/images/icon_money.png" alt=""></i>排行榜: <?php echo ($nowrank['money_num']); ?></span>
                        </p>
                        <p class="infoBox infoBox2">
                            <span class="info-txt"><i class="icon_img"><img src="/wk/Public/images/icon_money.png" alt=""></i>称号: <?php echo ($nowrank['nick']); ?></span>
                        </p>
                    </div>
                </div>
                <div class="dBox2">
                    <p class="infoBox2">发展经纪人：<?php if($nowrank['jjrcount'] > 0): echo ($nowrank['jjrcount']); else: ?>0<?php endif; ?>位</p>
                    <p class="infoBox2">活动积分:<?php echo ($nowrank['score']); ?></p>
                    <p class="infoBox2">推荐到访：<?php echo ($nowrank['dfcount']); ?>位</p>
                    <p class="infoBox2">打败了<?php echo ($nowrank['score_bfb']); ?>%的人</p>
                </div>
            </div>
            <div class="awardsBox">
                <p class="arrived" id="arrived" d-length="<?php echo ($nowrank['money']/10000000)*100;?>%"></p>
            </div>
            <div class="rankingList">
                <?php if(is_array($ranking)): $k = 0; $__LIST__ = $ranking;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($k % 2 );++$k;?><div class="listDetail">
                        <?php if($k < 4): ?><span class="rankNum r_best"><img src="/wk/Public/images/<?php echo ($k); ?>.png" alt=""></span>
                        <?php else: ?>
                            <span class="rankNum "><?php echo ($k); ?></span><?php endif; ?>
                        <img class="selfImg" src="<?php echo ($v['headimgurl']); ?>" alt="">
                        <span class="selfName">

                            <?php
 $uu = M('user')->where(['mobile'=>$v['mobile']])->find(); if($uu['nickname']){ echo mb_substr($uu['nickname'], 0,4,'utf-8'); }else{ echo mb_substr($v['name'], 0,4,'utf-8'); } ?>
                            
                        </span>
                        <div class="lineImg"><p class="arrived" id="arrived<?php echo ($k); ?>" d-length="<?php echo ($v['money']/10000000)*100;?>%"></p></div>
                        <p class="r_money"><?php echo ($v['money']); ?>元</p>    
                    </div><?php endforeach; endif; else: echo "" ;endif; ?>
                
            </div>
            <p class="remarkTxt">*以上数据因涉及成交统计，具有一定延迟性，因此仅作为阶段性排名公示。最终得奖以分享家后台数据统计为准。</p>
            <p class="moreBtn status_close" id="moreBtn"></p>
        </div>
        <div class="partDown conHide">
            <div class="ruleTxts">
                    <p class="s-title"></p>
                    <p class="txt-title1"></p>
                    <p class="txt">从本页面注册登录后，把广州万科楼盘信息分享给朋友并最终交易，即可获得认购金额的3‰作为佣金（税前）,同时交易金额也1:1视为本次活动的里程值；</p>
                    <p class="txt-title2"></p>
                    <p class="txt">里程值最快达到1000万的前三名用户，即获得"迪拜7天6夜极乐双人逍遥游"大奖</p>
                    <p class="txt-title3"></p>
                    <p class="txt txt2">
                        <i></i>
                        有效推荐到访达5次，即送话费100元，（活动期内，每月都可以参与）
                    </p>
                    <p class="txt txt2">
                        <i></i>
                        活动期内，发展经纪人数量达20个即送话费200元，多发展多送。
                    </p>
                    <p class="txt txt3">活动统计日期：2018年6月1日 --- 2018年12月31日</p>
                    <p class="txt txt4">奖品数量有限，先到先得，以工作人员通知为准;</p>
                    <p class="txt txt5">关于楼盘信息详情，可戳下面链接了解；本活动最终解释权归广州万科房地产有限公司所有</p>
            </div>
            <div class="btns">
                <a href="<?php echo U('index/index');?>"><p class="btn btn1" id="start">我的排名</p></a>
                <a href="https://union.vanke.com/wechat/#/homeForGz"><p class="btn btn2">去赚积分/佣金</p></a>
            </div>
        </div>
    </div>
    <script src="/wk/Public/js/jquery1.11.1.min.js"></script>
    <script src="/wk/Public/js/fastclick.min.js"></script>
    <script src="/wk/Public/js/layer.js"></script>
    <script type="text/javascript">

        /*var curUrl = location.href.split('#')[0];

        var wxConfigData = {
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: "<?php echo ($jsTicket['appId']); ?>", // 必填，公众号的唯一标识
            timestamp: "<?php echo ($jsTicket['timestamp']); ?>", // 必填，生成签名的时间戳
            nonceStr: "<?php echo ($jsTicket['nonceStr']); ?>", // 必填，生成签名的随机串
            signature: "<?php echo ($jsTicket['signature']); ?>",// 必填，签名，见附录1
            jsApiList: [
                'checkJsApi',
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'onMenuShareQQ',
                'onMenuShareWeibo'
            ] 
        };

        var wxData = {
                    title :"王者争霸，等你来战",
                    desc : "你的好友何冬参与争霸，等待你来挑战",
                    link : curUrl,
                    //imgUrl : '{{ URL::asset('recommend/images/bn.jpg') }}',
                    type: '', 
                    dataUrl: '', 
                    success: function () {
                        //分享成功
                    }
                };
        wx.config(wxConfigData);

        //alert('999');
        //alert(curUrl);

        // 分享绑定
        function addWeixinShareListening () {
            wx.onMenuShareTimeline(wxData);
            wx.onMenuShareAppMessage(wxData);
            wx.onMenuShareQQ(wxData);
            wx.onMenuShareWeibo(wxData);
        }

        //alert('666');

        wx.ready(function(){
            //wx.hideOptionMenu();
            addWeixinShareListening();
        });

        wx.error(function(res){
            //alert(res);
        });

        $("#shareBtn").click(function() {
            layer.open({
                        skin :'msg',
                        content : '请点击右上角菜单分享给好友' ,
                        time :3
                    });
        });*/

        $("#shareBtn").click(function() {
            layer.open({
                        skin :'msg',
                        content : '请点击右上角菜单分享给好友' ,
                        time :3
                    });
        });



        $(function(){
            FastClick.attach( document.body );  
            var Page = function(){};
            $.extend(Page.prototype , {
                init : function(){
                    this.bindEvents();
                },
                bindEvents : function(){
                    var _self = this;
                    // 里程血条状况...
                    $("#arrived").get(0).style.width = $("#arrived").attr("d-length");
                    
                    // 排行榜血条转状况...
                    var listEles = $(".listDetail");
                    for(var i=1;i<=listEles.length;i++){
                        $("#arrived" +i).get(0).style.width = $("#arrived" +i).attr("d-length");
                    }
                    $("#moreBtn").on("click",function(){
                        $(".partDown").toggleClass("conHide");
                        $(window).scrollTop(1000);
                    });
                },
                layerInfo : function(str){
                    layer.open({
                        skin :'msg',
                        content : str ,
                        time :3
                    });
                }
            });
            var page = new Page();
            page.init();
        })


    </script>
</body>
</html>